package com.foreveross.project.usercenterserver.oauth2.controller;

/**
 * @author: yz
 * @Date: 2019/7/22 10:43 AM
 */

import io.micrometer.core.instrument.util.StringUtils;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {
    @GetMapping("/signIn")
    public String signIn(@RequestParam(value = "error", required = false) String error,
                         Model model) {
        if (StringUtils.isNotEmpty(error)) {
            model.addAttribute("error", error);
        }
        //授权码模式应该跳转到前端的登陆页面
        return "signIn";
    }

}
